<?php

class Application_Model_DbTable_Groupposts extends Zend_Db_Table_Abstract
{

    protected $_name = 'GroupPosts';
	protected $_primary = 'id';
	
	public function addGroupPost($text, $DatePost, $User_id, $Group_id)
	{
		try{
			$data = array(
				'Text' => $text,
				'DatePost' => $DatePost,
				'User_id' => $User_id,
				'Group_id' => $Group_id,				
			);
			$this->insert($data);
		}
		catch (Zend_Exception $e) {  
			echo "Error message: " . $e->getMessage() . "\n";
        } 
	}

}

